package com.summer.content.api;


import com.summer.content.service.CourseCategoryService;
import com.summer.dto.CourseCategoryDto;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "课程分类API")
@RestController
public class CourseCategoryController {

    @Autowired
    private CourseCategoryService courseCategoryService;

    @GetMapping("course-category/tree-nodes")
    public List<CourseCategoryDto> getCategory() {
        return courseCategoryService.getAllCategory();
    }

    @GetMapping("/test")
    public String test(){
        return courseCategoryService.test();
    }
}
